Add Docker multi-architecture support and fix Streamlit module imports #157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR resolves Docker compatibility issues that prevented Streamlit applications from running properly in containers, especially on Apple Silicon machines.
Issues Fixed
1. Missing ARM64 Support for Apple Silicon
The Docker release workflows only built AMD64 images, causing compatibility issues on Apple Silicon Macs (M1/M2/M3/M4). Users would get architecture mismatch errors or have to use emulation which is slow and unreliable.
2. Module Import Failures in Docker
When running Streamlit in Docker containers, users encountered:
docker run ks6088ts/template-langgraph:0.0.23 streamlit run template_langgraph/services/streamlits/main.py # ModuleNotFoundError: No module named 'template_langgraph'
This happened because the Docker container's Python path didn't include the working directory where the
template_langgraph
module is located.Solution
Multi-Architecture Docker Builds
.github/workflows/docker-release.yaml
and.github/workflows/ghcr-release.yaml
to use Docker Buildxplatforms: linux/amd64,linux/arm64
to build images for both Intel and ARM architecturesFixed Python Module Resolution
ENV PYTHONPATH="${PYTHONPATH}:/app"
to the Dockerfiletemplate_langgraph
module without manual path manipulationEnhanced Developer Experience
make docker-run-streamlit
target for easy one-command executionUsage
Users can now run Streamlit apps seamlessly across all platforms:
The application will be accessible at http://localhost:8501 on both Intel and Apple Silicon machines.
Fixes #156.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.